﻿<?xml version="1.0" encoding="utf-8"?>
  <xs:schema id="NewDataSet" targetNamespace="http://euss.evaluant.com/schemas/MetaDataModel.xsd"
    xmlns:mstns="http://euss.evaluant.com/schemas/MetaDataModel.xsd" xmlns="http://euss.evaluant.com/schemas/MetaDataModel.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
    attributeFormDefault="qualified" elementFormDefault="qualified">
    
  <xs:complexType name="AttributeType">
    <xs:attribute name="name" type="xs:string" form="unqualified" use="required" />
    <xs:attribute name="type" type="xs:string" form="unqualified" use="required" />
  </xs:complexType>

  <xs:complexType name="ReferenceType">
    <xs:attribute name="name" type="xs:string" form="unqualified" use="required" />
    <xs:attribute name="type" type="xs:string"  form="unqualified" use="required" />
    <xs:attribute name="composition" type="xs:boolean" form="unqualified" use="optional" />
    <xs:attribute name="fromMany" type="xs:boolean" form="unqualified" use="optional" />
    <xs:attribute name="toMany" type="xs:boolean" form="unqualified" use="optional" />
  </xs:complexType>

  <xs:complexType name="EntityType">
    <xs:sequence maxOccurs="unbounded">
      <xs:element name="Attribute" type="AttributeType" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="Reference" type="ReferenceType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="type" type="xs:string" form="unqualified" use="required" />
    <xs:attribute name="inherit" type="xs:string" form="unqualified" use="optional" />
  </xs:complexType>

  <xs:element name="Model">
    <xs:complexType>
      <xs:sequence maxOccurs="unbounded">
        <xs:element name="Entity" type="EntityType" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>